home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C & C++ Multimedia Cyber Classroom
/
C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso
/
src
/
fig07_08.jar
/
Ch07
/
Fig07_08
/
Fig07_08.cpp
next >
Wrap
C/C++ Source or Header
|
1997-10-20
|
462b
|
25 lines
// Fig. 7.8: fig07_08.cpp
// Cascading member function calls together
// with the this pointer
#include <iostream.h>
#include "time6.h"
int main()
{
Time t;
t.setHour( 18 ).setMinute( 30 ).setSecond( 22 );
cout << "Military time: ";
t.printMilitary();
cout << "\nStandard time: ";
t.printStandard();
cout << "\n\nNew standard time: ";
t.setTime( 20, 20, 20 ).printStandard();
cout << endl;
return 0;
}